﻿
@{
    ViewData["Title"] = "标签列表";
    var tagConfig = ViewData["tag"] as site_config;
    var list = ViewData["list"] as List<ArticleCrawlerUrlTagConfig>;
}

<div class="row">
    <div class="col-md-12">
        <table class="@ViewHelper.Standard_table_css">
            <thead>
                <tr>
                    <th data-column-name="@nameof(ArticleCrawlerUrlTagConfig.TagName)">标签名称</th>
                    <th data-column-name="@nameof(ArticleCrawlerUrlTagConfig.TagUrl)">标签URL</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                @{
                    if (list.Count > 0)
                    {
                        foreach (var item in list)
                        {
                            var href = Url.Action("GetArticleData", new { url = item.TagUrl });
                            <tr data-id="@tagConfig.id">
                                <td><a href="@href" target="_blank">@item.TagName</a></td>
                                <td><a href="@item.TagUrl" target="_blank">@item.TagUrl</a></td>
                                <td><a href="@href" class="btn btn-primary btn-xs" target="_blank">开始抓取</a></td>
                            </tr>
                        }
                    }
                    else
                    {
                        @Html.Raw(ViewHelper.Standard_no_record_tr)
                    }
                }
            </tbody>
        </table>
        <div class="text text-info">
            <a href="https://sm.myapp.com/original/Browser/69.0.3497.100_chrome_installer.exe" target="_blank">必须先安装Chrome浏览器才能正常使用</a>
        </div>
    </div>
</div>

